package com.sc.VenusQueryBeta.presenter.home;

import com.sc.VenusQueryBeta.contract.home.HomeMainContract;
import com.sc.VenusQueryBeta.model.home.HomeMainModel;

/**
 * Created by SC-02 on 2018/9/19.
 * 主页presenter 继承契约类的presenper
 */

public class HomeMainPresenter extends HomeMainContract.HomeMainPresenter {


    /**
     * 实例化
     * @return 提供对象给外界
     */
    public static HomeMainPresenter newInstance() {
        return new HomeMainPresenter();
    }

    @Override
    public void getTabList() {
        if (mIView == null || mIModel == null)
            return;
//        com.orhanobut.logger.Logger.w(Arrays.toString(tabs));
        mIView.showTabList(mIModel.getTabs());
    }

    @Override
    protected HomeMainContract.IHomeMainModel getModel() { //获取对应的model对象
        return HomeMainModel.newInstance();
    }

    @Override
    public void onStart() {

    }
}
